<template>
  <div class="banner">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="#9926f7">
      <van-swipe-item 
      v-for="item in banner" 
      :key="item.id" @click="todetail(item.id)">

      <img :src="item.image" alt=""  width="100%">

      </van-swipe-item>
      
    </van-swipe>
  </div>
</template>
<script>
export default {
    name:"compBanner",
    data(){
        return{
            
        }
    },
    props:{
        banner:{
            type:Array
        }
    },
    methods:{
      todetail(id){
        this.$router.push({path:'/detail',query:{id:id}})
      }
    }
}
</script>
<style lang="scss" scoped>

.banner{
    
}
</style>